﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Basics.Shop.Product.ProductList" %>

<%@ Import Namespace ="ZLCMS.Business.Util" %>
<%@ Import Namespace="ZLCMS.Commands.User.Util" %>
<%=_framePage.GetPagerFormHtml(Request.RawUrl)%>


<%=_framePage.TabInfoHtml()%>

<form  id="pageForm" method="post" class="pageForm" runat="Server">
<div class="pageHeader">
	<div class="searchBar">    
    
     <ul class="searchContent">
            <li><span>商品名称&nbsp;</span>
                <input  cond="name" value="<%=Request["name"] %>"/>
                &nbsp;&nbsp; </li>
            <li><span>商品代码&nbsp;</span>
                <input cond="productno" value="<%=Request["productno"] %>"/>
                &nbsp;&nbsp; </li>
            <li><span>状态&nbsp;</span>
                <asp:dropdownlist runat="server" id="ddl_status" cond="status"
                    width="150px">
                </asp:dropdownlist>
            </li>
            <li><input type="hidden" value="<%=Kind %>" cond="kind"/></li>
        </ul>
        <div class="subBar">
            <ul>
                <li><a class="buttonActive" href="<%= Request.Path %>" onclick="ZLAN_DWZ_EX.query(this);"
                    target="navTab" rel="<%= _framePage.NavTabId %>" title="<%= _framePage.NavTabTitle %>">
                    <span>&nbsp;检&nbsp;索&nbsp;</span></a>&nbsp;&nbsp; </li>
            </ul>
        </div>
	</div>
</div>


<div class="pageContent">   
   	<div class="panelBar">
		<ul class="toolBar">
          <% if (AuthUtil.CheckAuthorization("PRODUCT_MAN", "ADD", _userAccount))
             { %>
			<li><a class="add"  href="/SystemManage/Basics/ProductCategory/SelectCategory.aspx?kind=normal" target="navTab" rel="ProductAdd" title="商品添加"><span>添加</span></a></li>
            <%} if (AuthUtil.CheckAuthorization("PRODUCT_MAN", "DELETE", _userAccount))
             {  %>
            <li><a class="delete" href="/SystemManage/Basics/Shop/Product/ProductDelete.aspx" target="selectedTodo" title="请确定要删除勾选记录"><span>删除</span></a></li>
            <%} %>
		</ul>
	</div>
	<div class="tableList"   layoutH="116">
	<table class="list" targetType="navTab" asc="asc" desc="desc">
	<thead>
                <tr>
                    <th width="22px">
                        <input type="checkbox" group="ids" class="checkboxCtrl" />
                    </th>
                    <th width="80px">
                        缩略图
                    </th>
                    <th width="120px">
                        商品编码
                    </th>
                    <th width="80px">
                        商品二维码
                    </th>
                    <th width="140px">
                        商品名称
                    </th>
                    <th width="100px">
                        所属分类
                    </th>
                    <%--<th width="100px">
                        产品类型
                    </th>--%>
                    <th width="100px">
                        库存
                    </th>
                    <th width="100px">
                        市场价
                    </th>
                    <th width="100px">
                        会员价
                    </th>
                    <th width="80px">
                        状态
                    </th>
                    <th width="180px" align=center>
                        操作
                    </th>
                </tr>
            </thead>
		<tbody>
            <asp:repeater runat="server" id="repeater1">
                <ItemTemplate>
		    <tr target="uid" >
                    <td><input name="ids" value="<%#Eval("Id")%>" type="checkbox"/></td>
				    <td height="80px"><img src="<%# FileKit.FirstImgPathThumb(Eval("ThumbnailImg") as string) %>" alt="商品图片" width="80px" /></td>
				    <td><%# Eval("ProductNo")%></td>
                   <td><%#GetQrcodeUrl(Container.DataItem) %></td>
				    <td><%# Eval("ProductName")%></td>
				    <td><%# ParamKit.GetValue("ProductType", Eval("TypeId").ToString(), "&nbsp")%></td>
                   <%--  <td><%# ParamKit.GetValue("ProductKind", Eval("Kind").ToString(), "&nbsp")%></td>--%>
                    <td><%#Eval("Storage")%></td>

				    <td><%# Eval("MarketPrice", "{0:0.00}") %></td>
				    <td><%# Eval("SalePrice", "{0:0.00}") %></td>
                    <td><%# (string)Eval("Status") == "1" ? "<span >上架中<span>" : "下架中"%></td>
				    <td  align=center> 
                    <% if (AuthUtil.CheckAuthorization("PRODUCT_MAN", "SJXJ", _userAccount))
                        { %>
                        <a href='/SystemManage/Basics/Shop/Product/ProductDelete.aspx?status=<%# (string)Eval("Status") == "1" ? "0" : "1"%>&ids=<%# Eval("Id")%>' target='ajaxTodo' title='请确定要更改商品的上架状态'><%# (string)Eval("Status") == "1" ? "设置下架" : "设置上架"%></a>&nbsp;&nbsp;
                        <%} if (AuthUtil.CheckAuthorization("PRODUCT_MAN", "EDIT", _userAccount))
                       { %>
				        <a href="/SystemManage/Basics/Shop/Product/ProductDetail.aspx?uid=<%# Eval("Id")%>" onclick="ZLAN_DWZ_EX.open(this);" target="navTab" title="产品详情" rel="ProductDetail">编辑</a>&nbsp;&nbsp;
                        <%} if (AuthUtil.CheckAuthorization("PRODUCT_MAN", "SJXJ", _userAccount))
                       {  %>
                        <a href="/SystemManage/Basics/Shop/Member/CommentList.aspx?TargetCode=<%# Eval("ProductNo")%>&TargetKind=PRODUCT" onclick="ZLAN_DWZ_EX.open(this);" target="navTab" title="产品评论" rel="ProductComment">查看评论</a>&nbsp;&nbsp;
                       <%} if (AuthUtil.CheckAuthorization("PRODUCT_MAN", "DELETE", _userAccount))
                       {  %>
                        <a href="/SystemManage/Basics/Shop/Product/ProductDelete.aspx?ids=<%# Eval("Id")%>" target="ajaxTodo" title="请确定要删除">删除</a>
                        <%} %>
				    </td>
			    </tr>
                </ItemTemplate>
            </asp:repeater>
		</tbody>
	</table>

	</div>
	
    
    
<%= _framePage.GetPagerContentHtml() %>
</div>
</form>